<include file="Public:header" />
<script type="text/javascript">
$(function(){
	$("#sql-submit").click(function(){
		var sql = $("#sql").val();
		
		if(sql == ''){
			alert('请输入要执行的SQL语句!');
			return false;	
		}else{
			$("#myForm").submit();	
		}
	});
});
</script>

<include file="nav" />
	<div class="formbox">
<form id="myForm" method="post" action="{:U('sql')}">
  <table cellpadding="0" cellspacing="0" width="100%">
    <thead>
      <tr>
        <td class="red">此SQL操作不可逆,如果你不是专业人员,请不要操作此功能</td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><textarea name="sql" id="sql" class="ipt" cols="80" rows="6">{$sql}</textarea>   
        <div class="clear"></div>   
        <notempty name="message"> 
        <div class="message">{$message}</div>
        </notempty>
        </td>
      </tr>
      <tr>
        <td><input id="sql-submit" type="button" class="btn" value="执行SQL" />
        </td>
      </tr>
    </tbody>
  </table>
</form>
</div>
<include file="Public:footer" />